package com.example.juccode.juc01threadpool.demo04.Task;

import java.time.LocalTime;

/**
 * @description: TODO
 * @date 2025/11/4 14:02
 */
public class RunableTask implements Runnable {
    //demo05 定时任务，延时任务，只执行一次
//    @Override
//    public void run() {
//        System.out.println(LocalTime.now());
//    }

    //demo06
    @Override
    public void run() {
        System.out.println(LocalTime.now());
        try {
            //休眠1秒
            Thread.sleep(1000);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
